import request from '@/utils/request'

export function getScene(params) {
  return request({
    url: '/portal/scene/page',
    method: 'get',
    params
  })
}
export function getMeasureList(params) {
  return request({
    url: '/portal/scene/base/list',
    method: 'get',
    params
  })
}
export function searchLine(params) {
  return request({
    url: '/portal/scene/calc_distance/list/two',
    method: 'get',
    params
  })
}
export function del(id) {
  return request({
    url: `/scene/${id}`,
    method: 'delete'
  })
}

export function add(data) {
  return request({
    url: `/scene`,
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: `/scene`,
    method: 'put',
    data
  })
}

export function clearMeasureData(params) {
  return request({
    url: `/portal/scene/calc_distance/list`,
    method: 'delete',
    params
  })
}

export function maintain(params) {
  return request({
    url: '/portal/task/open_close',
    method: 'get',
    params
  })
}

export function removeWarning(params) {
  return request({
    url: '/portal/scene/calc_distance/warning',
    method: 'get',
    params
  })
}

